Java Programming

Course Code: UGCOA22J503

Credits: 6 (Theory: 4, Practical: 2)

Type: Major

UNIT 1: Java Platform & Basic Syntax (15 Hrs)


UNIT 2: Classes and Objects (15 Hrs)


UNIT 3: Inheritance and Polymorphism (15 Hrs)


UNIT 4: Interfaces, Lambda Expressions & Exception Handling (15 Hrs)



Practical/Lab Course (2 Credits, 60 Hours)

  1. Install and configure a Java IDE (e.g., Eclipse, IntelliJ IDEA)
  2. Write a simple Java program to print “Hello, World!” on the screen
  3. Explore basic Java features like garbage collection, automatic memory management, and platform independence
  4. Compare and contrast Java with C++ focusing on key differences (e.g., pointers vs. references)
  5. Write a program to demonstrate different data types (int, double, char, boolean), variables, and constants
  6. Implement a program demonstrating various arithmetic, relational, and logical operators
  7. Write a program using if, else if, and else statements for decision making based on conditions
  8. Explore switch statement for handling multiple conditions with examples
  9. Implement a program using for loop for iterating a specific number of times
  10. Write a program using while loop for iterating until a certain condition is met
  11. Create and initialize an integer array, access elements, and modify them
  12. Write a program to iterate through an array using loop constructs and print elements
  13. Implement a method to find the sum, average, or maximum element in an array
  14. Write a program demonstrating how to read user input using Scanner class
  15. Explore basic file I/O operations: reading and writing data to a text file
  16. Define a simple class with attributes and methods to represent a book object
  17. Create objects of the book class, set their attributes, and call methods to access data
  18. Implement constructor overloading to create objects with different initial values
  19. Write a program demonstrating static methods and accessing them directly using the class name
  20. Explore instance variables vs. class (static) variables and their scope within a class
  21. Create a subclass inheriting from the book class to represent a specific genre (e.g., Novel)
  22. Override methods in the subclass to provide specific functionalities related to the genre
  23. Implement method overriding and demonstrate runtime polymorphism through object references
  24. Write a program using abstract classes and interfaces, defining abstract methods and implementing them in subclasses
  25. Explore the concept of abstract classes and their usage for defining common behavior for subclasses
  26. Create and manipulate strings using various string methods (e.g., concatenation, substring extraction)
  27. Write a program to compare strings using comparison operators and methods like equals and equalsIgnoreCase
  28. Implement a program demonstrating basic exception handling using try-catch blocks
  29. Explore throwing and catching custom exceptions for specific error scenarios in your code
  30. Write a program using regular expressions for basic pattern matching within strings (e.g., validating email format)
  31. Explore generic classes like ArrayList and manipulate collections of objects
  32. Lambda Expressions: Write concise code for simple operations using lambda expressions. Multithreading: Implement basic multithreading concepts for concurrent execution
  33. Interfaces & Comparators: Define and use interfaces for defining common behavior across classes and implement comparators for sorting
  34. Object Cloning: Explore techniques for creating a copy of an object

SUGGESTED READING

Textbook:

  1. Core Java Volume I - Fundamentals, 12th Edition by Pearson. by Cay S. Horstmann O’rielly Publications. ISBN: 9780137673810

Reference Books:

  1. K. Sierra, Sun Certified Programmer For Java 5, Wiley India, 2006.
  2. K. Sierra and B. Bates, Head First Java (Java 5), 2nd Edition, O’Reilly, 2003.
  3. H.M. Dietel and P.J. Dietel, Java: How to Program, 6th Edition, Pearson Education, 2007.
  4. E. Balagurusamy, Programming with Java: A Primer, 4th Edition, Tata Mcgraw Hill, 2010.